﻿<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>忧郁小王子-登录页</title>

<link rel="stylesheet" type="text/css" href="/home/login/css/style.css">

<script type="text/javascript" src="/home/login/js/jquery.min.js"></script>
<script type="text/javascript" src="/home/login/js/vector.js"></script>

</head>
<body>

<div id="container">
	<div id="output">
		<div class="containerT">
			<h1>用户登录</h1>
			<form  id="entry_form" method="post" action="/login">
				<input type="text" name="username" placeholder="请输入用户名" id="entry_username">
				<input type="password" name="password" placeholder="请输入密码" id="entry_password">
				<button type="submit" id="entry_btn" onclick="return check()">登录</button>
			</form>
		</div>
	</div>
</div>

<script type="text/javascript">
    $(function(){
        Victor("container", "output");   //登录背景函数
        $("#entry_username").focus();
        $(document).keydown(function(event){
            if(event.keyCode==13){
                $("#entry_btn").click();
            }
        });
    });
		function check(event){
			let username = $('#entry_username').val();
			let password = $('#entry_password').val();
			if(username == ''){
				alert('用户名不能为空！！！');
				return false;
			}else if(password == ''){
				alert('密码不能为空！！！');
				return false;
			}
			else{
				return true;
			}
		}
</script>
<div style="text-align:center;">
 
</div>
</body>
</html>